import sys
if len(sys.argv) != 2:
    print("please supply a filename")
    raise SystemExit(1)

f = sys.argv[1]
portfolio = []

for line in open(f):
    fields = line.strip()
    if fields:
        fields = fields.split(",")
    else:
        break
    ##print fields
    name = fields[0]
    shares = int(fields[1])
    price = float(fields[2])
    stock = (name, shares, price)
    portfolio.append(stock)

print portfolio
